Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
Samotop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
BrightOpen
Samotop
Commits
ebb0b951
Commit
ebb0b951
authored
3 years ago
by
Bright Open Jo
Browse files
Options
Downloads
Patches
Plain Diff
#13
maybe fix
read more input
parent
b10810bf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#459293298
passed with warnings
3 years ago
Stage: build
Stage: release
Pipeline: Samotop
#459298302
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
samotop-core/src/smtp/prudence.rs
+3
-3
3 additions, 3 deletions
samotop-core/src/smtp/prudence.rs
with
3 additions
and
3 deletions
samotop-core/src/smtp/prudence.rs
+
3
−
3
View file @
ebb0b951
...
...
@@ -62,15 +62,15 @@ impl SessionService for PrudentService {
{
Box
::
pin
(
async
move
{
if
let
Some
(
delay
)
=
self
.config.wait_for_banner_delay
{
let
mut
buf
=
[
0u8
];
let
mut
buf
=
[
0u8
;
425
];
use
async_std
::
io
::
ReadExt
;
match
io
.read
(
&
mut
buf
[
..
])
.timeout
(
delay
)
.await
{
Some
(
Ok
(
0
))
=>
{
// this just looks like the client gave up and left
warn!
(
"{} touch and go!"
,
state
.session.connection.peer_addr
)
}
Some
(
Ok
(
_
))
=>
{
state
.session.input
.
push
(
buf
[
0
]);
Some
(
Ok
(
len
))
=>
{
state
.session.input
.
extend_from_slice
(
&
buf
[
0
..
len
]);
state
.session
.say_shutdown_processing_err
(
"Client sent commands before banner"
.into
(),
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment