Comments (4)
Please open issues about actual bugs, not about a list of things you would've done differently.
errors.Is(err, net.ErrClosed)
Is this about #563?
Also use fmt.Errorf with %w directive, so that underlying error remains in error chain
— that way consumers can also check for net.ErrClosed
No: using %w makes the underlying errors part of the API. This should only be done on a case by case basis.
instead of using locks, one can use a clever set of atomics and single-invocation-enforcing atomic.Bool
No: I prefer simple over clever.
I would also refrain from deferred function literals
No, I don't believe that's the case.
You’d be well served to separate socket management from socket use, ie. separate tcp Listen from imap Login
Doesn't make sense to me.
from go-imap.
It is not the same issue. It is during login. imapclient appears to be closing the socket while it is writing resulting in short write
I wrote a stub imap client that logs in just fine with the exact same login request
- OK Gimap ready for requests…
I am looking into it.
This would be simpler if each request had its own struct type with fields containing all possible parameters
then a single method that sends serialized data to Write. Like Google did with route message: https://cs.opensource.google/go/x/net/+/refs/tags/v0.19.0:route/route.go;l=72
from go-imap.
each request had its own struct type
This would disallow streaming of literals.
from go-imap.
I verified that the issue is not that the socket is closed
There are 4 copies of the socket, and somewhere in that, bufio encounters a short write although the socket is OK
— gmail fails
— my own imap server works but the short write error is visible in the logs
I’m thinking I can catch it with the debugger
I’ll have it figured by tomorrow
—
Writing functional chaining can make you feel good
It is not a common way to write Go code
Go is a language of structs. If you have more than one value, you use a struct or will eventually have to refactor
I return read-to-end sockets for Android using that Google architecture
What I realized was that people who don’t use that package still use the struct because it can configure routes on any operating system. They put things in the struct, get the byte-stream and use it for something else
Baseless assertions isn’t gong to change that Google has shown us how to do things
Another new language feature is those locks used to retrieve multiple fields could be atomic.Pointer returning an updatable read-only struct of any number of fields thread-safe at once without a lock
What has happened is that any field written after the new function often becomes atomic.Pointer
Anyway, I just need this imapclient to work, and right now it doesn’t
from go-imap.
Related Issues (20)
- v2: client: support custom tls.Config{} in DialTLS() and DialStartTLS() HOT 2
- Implement limits for parser HOT 1
- v2 client: Status with ststusOption nil hangs HOT 1
- v2 STORE flags not returned HOT 2
- v2 DebugWriter breaks LOGIN or any imap command HOT 2
- v2 Invokes Client.conn.Close multiple times producing errors HOT 1
- v1 branch overwritten? HOT 2
- Set timeout for Dial() HOT 1
- Support IMAP4 ID command (RFC 1971) HOT 11
- Cannot connect to Cyrus IMAP 2.5 - hangs on login HOT 4
- Idle client v2 stops receiving new emails in some time. HOT 5
- The receiving mail runs on the cloud server
- Raw UTF-8 is rejected by utf7 package when UTF8=ACCEPT is enabled
- utf7: simplify implementation
- Disable UTF-7 encoding for IMAP4rev2
- v1: connection hangs forever in "handleGreetAndStartReading" HOT 1
- v2: fails to parse imap server response HOT 2
- client: Dovecot startup failure hangs test HOT 1
- FETCH command did not return any message HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-imap.