From 7702925497a8230f50d2317c9ad41a73de0683ae Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 9 Dec 2019 18:35:51 +0100 Subject: Make SessionManager create the IMAP client This will allow SessionManager to re-connect when the IMAP server logs the user out. --- plugin.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugin.go') diff --git a/plugin.go b/plugin.go index 26473b1..9464d60 100644 --- a/plugin.go +++ b/plugin.go @@ -38,15 +38,15 @@ func (p *luaPlugin) onRender(l *lua.LState) int { func (p *luaPlugin) setFilter(l *lua.LState) int { name := l.CheckString(1) f := l.CheckFunction(2) - p.filters[name] = func(args... interface{}) string { + p.filters[name] = func(args ...interface{}) string { luaArgs := make([]lua.LValue, len(args)) for i, v := range args { luaArgs[i] = luar.New(l, v) } err := l.CallByParam(lua.P{ - Fn: f, - NRet: 1, + Fn: f, + NRet: 1, Protect: true, }, luaArgs...) if err != nil { -- cgit v1.2.3-59-g8ed1b