Flying-Toast / yugo

Yugo is an easy and high-level IMAP client library for Elixir.
https://hex.pm/packages/yugo
MIT License
42 stars 7 forks source link

GenServer terminating on timeout #9

Closed DmitryPopov closed 1 year ago

DmitryPopov commented 1 year ago

Getting next error time to time: 04:06:50.646 [error] GenServer {Yugo.Registry, :mail_client} terminating ** (FunctionClauseError) no function clause matching in Yugo.Parser.parse_untagged_with_status/2 (yugo 0.3.1) lib/yugo/parser.ex:98: Yugo.Parser.parse_untagged_with_status("timeout", :bye) (yugo 0.3.1) lib/yugo/client.ex:266: Yugo.Client.handle_packet/2 (yugo 0.3.1) lib/yugo/client.ex:184: Yugo.Client.handle_info/2 (stdlib 4.3) gen_server.erl:1123: :gen_server.try_dispatch/4 (stdlib 4.3) gen_server.erl:1200: :gen_server.handle_msg/6 (stdlib 4.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3 Last message: {:ssl, {:sslsocket, {:gen_tcp, #Port<0.144>, :tls_connection, :undefined}, [#PID<0.2781.0>, #PID<0.2780.0>]}, "* BYE timeout\r\n"}

Flying-Toast commented 1 year ago

Thanks for reporting this. The IMAP spec requires servers with such “timeout” features MUST have a timeout of at least 30 minutes - Yugo should send a heartbeat every 27 minutes. Could you measure how long it’s taking you to get the timeouts? Also, what mail server are you connecting to?

Flying-Toast commented 1 year ago

@DmitryPopov Any update? If not I'm gonna close this issue.