Silence StatusNotImplemented error for Logout()
This commit is contained in:
		
							parent
							
								
									c741076986
								
							
						
					
					
						commit
						519b366223
					
				@ -3,6 +3,7 @@ package ftp
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"bytes"
 | 
						"bytes"
 | 
				
			||||||
	"io/ioutil"
 | 
						"io/ioutil"
 | 
				
			||||||
 | 
						"net/textproto"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@ -110,7 +111,13 @@ func TestConn(t *testing.T) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	err = c.Logout()
 | 
						err = c.Logout()
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		t.Error(err)
 | 
							if protoErr := err.(*textproto.Error); protoErr != nil {
 | 
				
			||||||
 | 
								if protoErr.Code != StatusNotImplemented {
 | 
				
			||||||
 | 
									t.Error(err)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								t.Error(err)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	c.Quit()
 | 
						c.Quit()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user